-- GENERATED SPELL FOR [Wildspawn Betrayer] --


function spell0_11454(pUnit, Event) --@Exploding Shot,n/a--
pUnit:FullCastSpellOnTarget(7896,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11454', 1000, 1)
end

function spell1_11454(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(11428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11454', 2283, 1)
end

function spell2_11454(pUnit, Event) --@Shadow Shot,n/a--
pUnit:FullCastSpellOnTarget(18649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11454', 0, 1)
end

function spell3_11454(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11454', 526, 1)
end

function Sorts_11454(pUnit, Event)
local choix_sorts_11454 = math.random(0, 3)
if choix_sorts_11454 == 0 then
pUnit:RegisterEvent('spell0_11454', 1, 1)
end
if choix_sorts_11454 == 1 then
pUnit:RegisterEvent('spell1_11454', 1, 1)
end
if choix_sorts_11454 == 2 then
pUnit:RegisterEvent('spell2_11454', 1, 1)
end
if choix_sorts_11454 == 3 then
pUnit:RegisterEvent('spell3_11454', 1, 1)
end
end

function mob11454_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11454', math.random(1500, 3000), 1)
end

function mob11454_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11454_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11454_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11454, 1, 'mob11454_Action')
RegisterUnitEvent(11454, 2, 'mob11454_Leave')
RegisterUnitEvent(11454, 3, 'mob11454_Kill')
RegisterUnitEvent(11454, 4, 'mob11454_Die')
